package gtkwire.gobject;

import gtkwire.*;

/**
*GtkTreeIter is a transient reference to a specific node on a specific model.
*/
public class GtkTreeIter
{
	/**
	* Runtime id, used to communicate with native side.
	*/
	private int id;
	private int treeModelId;
	private static final String dummy = "";
	
	protected GtkTreeIter( int id, int treeModelId )
	{
		this.id = id;
		this.treeModelId = treeModelId;
	}

	protected int getId(){ return id; }
	protected int getTreeModelId(){ return treeModelId; }

	/**
	* Returns true if this iterator is still valid. Trying to use non-valid iterator will not work and wight cause null error.
	*/
	public boolean isValid()
	{
		return false;
	}


	public GtkTreePath getPath(){ return null; }

	public Object getValue( int column ){ return null; }

	/**
	*Sets iter to point to the node following it at the current level.
	*/
	public void next()
	{
		int[] idata = new int[2];
		idata[0] = treeModelId;
		idata[1] = id;
		GTKWireApp.instance().sendCommand( GObject.MAGIC_NAME, GTKWireCommand.TW_TM_NEXT, idata );
	}

/*
	//**
	*Sets iter to point to the first child of parent. If parent has no children, FALSE is returned and iter is set to be invali
	
	public void setIterToFirstChild( GtkTreeIter iter )

	public boolean hasChild()

	public int childCount()

	public void setIterToChild( int index, GtkTreeIter iter )

	public void setIterToParent(  GtkTreeIter iter )
*/

}